<ui:composition
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		>

	<h:panelGrid id="#{idPrefix}StudentParentsEditPanel" columns="3" width="380px">

		<h:outputText value="#{studentBundle.studentParentsName}" styleClass="requiredField"/>
		<h:inputText value="#{parent.name}" id="#{idPrefix}ParentsName"
					 styleClass="sizeCopmonent"
					 maxlength="100"/>
		<itdep:errorMessage for="#{idPrefix}ParentsName"/>

		<h:outputText value="#{personBundle.birthDate}" styleClass="requiredField"/>
		<rich:calendar value="#{parent.dateOfBirth}" id="#{idPrefix}DirectiveDate"
					   inputSize="14"/>
		<itdep:errorMessage for="#{idPrefix}DirectiveDate"/>

		<h:outputText value="#{studentBundle.studentParentsWork}" styleClass="requiredField"/>
		<h:inputText value="#{parent.work}" id="#{idPrefix}ParentsWork"
					 styleClass="sizeCopmonent"
					 maxlength="100"/>
		<itdep:errorMessage for="#{idPrefix}ParentsWork"/>

		<h:outputText value="#{dictionaryBundle.typeOfRelationship}" styleClass="requiredField"/>
		<itdep:entitySelectMenu value="#{parent.typeOfRelationship}" entityType="type-of-relationship"
								id="#{idPrefix}TypeOfRelationship" anyValue="true"
								format="{i18n.description}" styleClass="sizeCopmonent"/>
		<itdep:errorMessage for="#{idPrefix}TypeOfRelationship"/>


	</h:panelGrid>
	<h:panelGroup rendered="#{address}">
		<ui:decorate template="/facelets/template/person/addressEditCompact.xhtml">
			<ui:param name="idPrefix" value="#{idPrefix}parentAddress"/>
			<ui:param name="address" value="#{studentParentsBean.address}"/>
			<ui:param name="addrBean" value="#{addressBean}"/>
			<ui:param name="addrType" value="false"/>
			<ui:param name="accomod" value="false"/>
		</ui:decorate>
	</h:panelGroup>

</ui:composition>
